﻿namespace assignment_2_1
{
    internal class Program_1
    {
        private static void Main()
        {
            int num;
            Console.Write("请输入一个数字：");
            while (!int.TryParse(Console.ReadLine(), out num))
            {
                Console.WriteLine("输入无效，请重新输入数字：");
            }

            int i = 2;
            while (i <= num)
            {
                if (num % i == 0)
                {
                    num /= i;
                    Console.WriteLine(i);
                }
                else
                {
                    i++;
                }
            }
        }
    }
}